package biz.core.controller;
import java.util.List;

import biz.core.base.BaseAction;
import biz.core.domain.User;
import biz.core.service.UserService;

/**
 * @author liuxuncai
 *
 */
public class Test extends BaseAction{
	private List<User> userList;
	private UserService userService;
	private String isSuccess;
	@Override
	public String execute() throws Exception {
		userList=userService.findAll();
		//User user=userDAO.findById(1);
		//userList.add(user);
		if(null==userList){
			isSuccess="获取数据失败";
			return ERROR;
		}else{
			isSuccess="获取数据成功";
			logger.error("出错了");
			logger.info("Info信息");
			logger.warn("warn信息");
		return SUCCESS;
		}
	}
	
	
	
	
	public String getIsSuccess() {
		return isSuccess;
	}

	public void setIsSuccess(String isSuccess) {
		this.isSuccess = isSuccess;
	}

	public List<User> getUserList() {
		return userList;
	}

	public void setUserService(UserService userService) {
		this.userService = userService;
	}

	public void setUserList(List<User> userList) {
		this.userList = userList;
	}

}
